home *** CD-ROM | disk | FTP | other *** search
- This is 65Host, version 1.40
-
- Documentation on how to use 65Host can be found in Edition 2 of the
- Archimedes User Guide and in the RISC OS User Guide.
-
- The following remarks should be noted about this version of 65Host and its
- documentation.
-
- 65Host provides a limited emulation of a BBC Model B Microcomputer only.
- Versions of programs which run on the BBC Master 128 or Master Compact may
- use facilities not available on the BBC Model B, and so may not work under
- this emulation.
-
- Full emulation of the parallel (Centronics) printer port is provided, via
- the Archimedes parallel printer socket. The parallel printer is selected by
- default (the selection can be changed using FX 5). Printing is enabled and
- disabled in the normal way, usually via CTRL-B and CTRL-C respectively.
-
- No emulation of the serial port, or of the Econet printer interface, is
- provided.
-
- The User VIA chip is only accessible to the emulator when an I/O Expansion
- Card is present. If a program uses the User VIA timers, it will not operate
- correctly without an I/O Expansion Card being fitted.
-
- If an I/O Expansion Card is fitted, then timer interrupts generated from the
- 6522 may be handled by 6502 programs. However, the timers are driven at
- 2MHz, rather than the 1MHz on the Model B.
-
- Full sound chip emulation is provided. In conjunction with the 6502
- operating system, this allows use of the SOUND and ENVELOPE keywords from
- BASIC, and the associated OSWORD calls. This gives the usual 3 tone channels
- (square waves) and a noise/pulse wave channel.
-
- Screen accessing has been speeded up since version 1.00.
-
- Keyboard handling has been modified so that characters inserted into the
- RISC OS keyboard buffer are later transferred into the 6502 keyboard buffer,
- via the normal insert mechanism. This means that programs which use INSV
- should now work. Also, OSBYTE calls &79 and &7A, which scan a range of keys,
- now work correctly. The pound key now generates the correct code (&60).
-
- However, the keyboard interrupt (which is generated when any keys are
- depressed on a selected row) is not supported. There may also be problems
- which result from the differing layouts of the Model B and Archimedes
- keyboards, especially programs which attempt to do their own SHIFT key
- processing (some legends are paired differently on the two keyboards).
-
- The FX 247 mechanism, which allows a 6502 application to intercept reset (ie
- the Break key), now works correctly.
-
- Hardware scrolling in MODE 7, followed by a CLS, now works correctly.
-
- Only limited 6845 programming is permitted:-
- Registers 0..8 not supported
- Register 9 limited support (for implementing modes 0/3, 4/6)
- Registers 10,11 supported
- Registers 12,13 limited to vertical scrolling of the screen
- Registers 14,15 cursor positioning only to resolution of 1 character
-
- There is no emulation of the disc controller. As a consequence,
- copy-protected programs or those which attempt direct access to DFS
- directory sectors are unlikely to operate correctly.
-
- However, OSWORD &72 (read/write sectors off ADFS) is implemented. The call
- gets translated into a call to ADFS_DiscOp. This allows some software
- written for the Electron Plus 3 or the Master Compact to work, although
- there may be machine differences which cause other problems.
- Current limitations: if a disc error occurs, an error is generated, rather
- than the error type being returned at offset 0 in the block. OSWORD &73
- (Read last error information) is not supported.
-
- The OSARGS call with A=1,Y=0 (Return address of rest of command line) now
- functions correctly (both on ARFS and on the emulated DFS (see below)).
-
- The *-commands described in the User Guide (*ListROMs, *SwapROMs, *CacheROM,
- *LinkROM, *EmulateBBC) are RISC OS *-commands provided by the emulator
- module. *Quit, on the other hand, is provided within the emulated BBC
- Microcomputer.
-
- In addition the following *-commands are provided within the emulation:
-
- *Reset [<number>]
- Performs a 6502 reset, like CALL !-4.
- If number=1, a power-on reset is performed.
-
- *Go [<address>]
- Branch the emulated 6502 to the specified address.
-
- *OS
- Provide a *-prompt loop within the 6502 emulator.
-
- The paged ROM image 'UtilsROM' provides various extra commands:
-
- *Build, *Dump, *List, *Type perform the same functions as the commands of
- the same name provided in the Model B DNFS ROM.
-
- *ROMs lists the loaded paged ROM images.
-
- It also provides a number of commands for controlling sideways RAM (type
- *Help SRAM inside the emulator for a list of them). These commands operate
- in the same way as on the Master. However, by default, the emulator starts
- up with no sideways RAM allocated (the original Model B had no sideways
- RAM).
-
- This setup can be changed to that of the Master (four banks of sideways
- RAM in sockets 4,5,6 and 7) by editing the !Run file inside the !65Host
- application directory (see that file for instructions). Note that this
- uses an extra 64K of module workspace (16K for each bank).
-
- Note also that software written for the Master which makes use of sideways
- RAM may also make use of other facilities which are available on the Master,
- but not on the Model B, eg shadow RAM.
-
- In the emulator the Break key emulates the Break key on the emulated
- computer, but the reset button resets Archimedes.
-
- A limited emulation of the disc filing system (DFS) is provided, in order to
- allow software to run which assumes DFS file naming conventions (ie
- non-hierarchical, single character qualifiers).
-
- Note that this does NOT allow the direct use of 5.25" DFS format floppies,
- even with an appropriate disc drive and interface.
-
- Instead it uses the current RISC OS filing system with a translation applied
- to the filenames, as follows:-
-
- A DFS name consists of:
-
- drive - one of '0', '1', '2', '3'
- qualifier - a single character, default '$'
- name - 7 characters long.
-
- This is passed to RISC OS as:
-
- drive, dot, qualifier, name
-
- eg a DFS name of ':2.A.Fred' would be translated to '2.AFred'.
-
- However, certain qualifiers which are allowed on DFS (eg the default '$'),
- are reserved characters in RISC OS filenames, so these are substituted by
- other characters, as follows:-
-
- '$' is translated into '['
- ' ' ---------""------- '`'
- '@' ---------""------- '<'
- '|' ---------""------- '>'
- '"' ---------""------- ']'
- '%' ---------""------- '}'
- '&' ---------""------- '{'
- '^' ---------""------- ')'
-
- eg a DFS name of ':1.$.Jim' would be translated to '1.[Jim'.
-
- Typically this would be used by setting up an ADFS disc containing
- directories named 0, 1, 2 and 3 and ensuring that their parent is the current
- directory when 65Host is started. These are then used as drives by the DFS
- emulation. Within each of these directories, a name such as 'CSheila'
- represents the DFS file 'C.Sheila'.
-
- All of this is to allow accurate emulation of such DFS commands as *Drive,
- *Dir and *Lib. Using the ADFS or Net filing systems directly is often
- simpler.
-
- *ADFS and *Net can be used to make the named RISC OS filing systems current.
- Alternatively, *ARFS gives access to the current RISC OS filing system.
- *Disc selects the DFS emulation, using the current RISC OS filing system.
-
- *Tape is provided (in case an application issues this command), but cannot
- load or save files.
-
- Information for software developers
- -----------------------------------
-
- An interface has been added to allow 6502 paged ROM images to be developed
- which make access to RISC OS SWIs. The SWI is called by executing a
- previously undefined 6502 opcode.
-
- 6502 Opcode &07 - Issue SWI call
- --------------------------------
-
- in: XY (X lo-byte, Y hi-byte) points to control block (cb)
-
- cb?0..2 = SWI number (lo..hi) (bit 17 set => return errors with V set)
-
- cb?3 = number of registers to put back into block on exit, starting at R0
-
- cb?4 = bit set of registers to relocate on entry to SWI
- (bit n set => relocate Rn from 6502 to ARM address space)
-
- cb?5 = bit set of registers to unrelocate on exit from SWI
- (bit n set => unrelocate Rn from ARM to 6502 address space)
-
- cb?6,7 = address (lo,hi) of error buffer (in 6502 space)
- only relevant if bit 17 of SWI number set
-
- cb?8 = length of error buffer (can be zero)
-
- cb!9 = register R0
-
- cb!13 = register R1
-
- ..
-
- cb!37 = register R7
-
- out: A,X,Y preserved
- N,Z,C,V as returned by the ARM on exit from the SWI
- Some or all of the register block is updated with the
- values on exit (possibly relocated), as controlled by cb?3,4,5
-
- If bit 17 of the SWI number was clear, and an error occurs, then
- control will not returned to the 6502 code - instead the error
- block is copied to &100 in 6502 format (ie zero byte, 1 byte error
- number, followed by zero terminated error string) and then it jumps
- to &100, which causes a BRK. If no error occurred, control will be
- returned and V will be clear.
-
- If bit 17 of the SWI number was set, then the X form of the SWI
- is issued; if this returns with V set, then the error block is
- copied into the specified error buffer in 6502 format, truncated
- to the length of the error buffer (if truncated the terminating
- zero will be in the last byte of the error buffer).
-
- Support has also been added for selecting a filing system and running a
- file, when the emulator is started.
-
- On any reset, system variable 65Host$BootOptions is read.
-
- Bits 2..7, 16..31 are reserved and should be set to 0.
-
- Bits 8..15 contain the number of the filing system to be started up.
-
- 0 => default ie ADFS
- 1 => TAPE (of little use!)
- 4 => DFS emulation
- 5 => NET
- 8 => ADFS
- 11 => ARFS (ie the current RISC OS filing system)
-
- Bits 0..1 are the boot option (the equivalent of the *OPT 4 setting)
-
- 0 => do nothing, 1 => *Load, 2 => *Run, 3 => *Exec
-
- On a power-on reset this boot option is used in conjunction with the
- filename specified by the system variable 65Host$BootFile to 'run' a
- program.
-
- eg the following sequence enters the emulator, selects the ADFS filing
- system and *Runs a file called Game :-
-
- *Set 65Host$BootOptions &802
- *Set 65Host$BootFile Game
- *EmulateBBC
-
- The !Run file sets up these variables from the rest of the command line
- passed to it. The syntax is
-
- *Run !65Host <BootOptions> <BootFile>
-
- eg to load the emulator and perform the above operation, you might do :-
-
- *Run !65Host &802 Game
-